(function(Vue) {
	Vue.filter('fromNow', function(time) {
		var between = Date.now() / 1000 - Number(time)
		if (between < 60) {
			return '刚刚';
		} else if (between < 3600) {
			return ~~(between / 60) + ' 分钟'
		} else if (between < 86400) {
			return ~~(between / 3600) + ' 小时'
		} else {
			return ~~(between / 86400) + ' 天'
		}
	});
})(Vue);